import { type RouteRecordRaw } from 'vue-router';

export const systemRoutes: RouteRecordRaw[] = [
  {
    name: 'system',
    path: '/system',
    redirect: '/system/users',
    meta: { title: '平台管理', icon: 'system_1' },
    children: [
      {
        path: 'users',
        name: 'users',
        meta: { title: '用户管理', icon: 'menu-users' },
        component: () => import('@/views/system/users/Index.vue'),
      },
      {
        path: 'roles',
        name: 'roles',
        meta: { title: '角色管理', icon: 'menu-peoples' },
        component: () => import('@/views/system/roles/Index.vue'),
      },
      {
        path: 'menus',
        name: 'menus',
        meta: { title: '菜单管理', icon: 'menu-tree-table' },
        component: () => import('@/views/system/menus/Index.vue'),
      },
      {
        path: 'dept',
        name: 'dept',
        meta: { title: '部门管理', icon: 'menu-mechanism' },
        component: () => import('@/views/system/dept/Index.vue'),
      },
      {
        path: 'post',
        name: 'post',
        meta: { title: '岗位管理', icon: 'menu-posts' },
        component: () => import('@/views/system/post/Index.vue'),
      },
      {
        path: 'dict',
        name: 'dict',
        meta: { title: '字典管理', icon: 'menu-dictionary' },
        component: () => import('@/views/system/dict/Index.vue'),
      },
      {
        path: 'dict-detail',
        name: 'dict-detail',
        meta: { title: '字典管理详情', hide: true },
        component: () => import('@/views/system/dict-detail/Index.vue'),
      },
      {
        path: 'params-configuration',
        name: 'params-configuration',
        meta: { title: '参数设置', icon: 'menu-edit' },
        component: () => import('@/views/system/params/Index.vue'),
      },
      {
        path: 'announcement',
        name: 'announcement',
        meta: { title: '通知公告', icon: 'menu-message' },
        component: () => import('@/views/system/announcement/Index.vue'),
      },
      {
        path: 'tdData',
        name: 'tdData',
        meta: { title: '数据管理', icon: 'menu-button' },
        component: () => import('@/views/system/tdData/Index.vue'),
      },
      {
        path: '/serverManage',
        name: 'serverManage',
        meta: { title: '服务端管理', icon: 'menu-button' },
        children: [
          {
            path: 'serverStatus',
            name: 'serverStatus',
            meta: { title: '服务端状态', icon: 'menu-button' },
            component: () => import('@/views/server/status/Index.vue'),
          },
          {
            path: 'serverConfig',
            name: 'serverConfig',
            meta: { title: '服务管理', icon: 'menu-button' },
            component: () => import('@/views/server/config/Index.vue'),
          },
        ],
      },
      // {
      //   path: 'login-configuration',
      //   name: 'login-configuration',
      //   meta: { title: '登录页配置' },
      //   component: () => import('@/views/system/login-configuration/Index.vue'),
      // },
    ],
  },
];
